package cn.virens.dd.simple.strategy;

import java.util.Date;

import cn.virens.dd.simple.AbstractStrategy;
import cn.virens.dd.simple.value.StrategyValueByTime;

public class StrategyByTime extends AbstractStrategy<StrategyValueByTime> {
	private final Date time;

	public StrategyByTime(String time) {
		this.time = parseTimeByHM(time);
	}

	public Date getTime() {
		return time;
	}

	@Override
	public void close() throws Exception {

	}

	@Override
	protected boolean filter0(StrategyValueByTime value) {
		return before(time, value.getTime());
	}
}
